package com.cxq.boot.dto;

import lombok.Data;
import org.jetbrains.annotations.NotNull;

/**
 * PriorityQueue 元素的类实现排序功能
 */
@Data
public class HotTagDTO implements Comparable{
    private String name;
    private Integer priority;

    @Override
    public int compareTo(@NotNull Object o) {
        return this.getPriority() - ((HotTagDTO)o).getPriority();
    }
}
